package io.finer.erp.jeecg.bas.service;

import io.finer.erp.jeecg.bas.dto.FormulaDTO;
import io.finer.erp.jeecg.bas.entity.BasPfMaterial;
import io.finer.erp.jeecg.bas.entity.BasProductFormula;
import com.baomidou.mybatisplus.extension.service.IService;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.jeecg.common.api.vo.Result;

/**
 * @Description: 产品配方
 * @Author: jeecg-boot
 * @Date:   2020-10-19
 * @Version: V1.0
 */
public interface IBasProductFormulaService extends IService<BasProductFormula> {

	/**
	 * 添加一对多
	 * 
	 */
	public void saveMain(BasProductFormula basProductFormula,List<BasPfMaterial> basPfMaterialList) ;
	
	/**
	 * 修改一对多
	 * 
	 */
	public void updateMain(BasProductFormula basProductFormula,List<BasPfMaterial> basPfMaterialList);
	
	/**
	 * 删除一对多
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	public List<FormulaDTO> getFormulaByCategoryId(String categoryId);

	/**
	 * @Description 根据分类查询配方
	 * @param categoryId
	 * @return
	 * Create at: 2020-12-14 16:47:50
	 * @author: duany
	 * Revision:
	 *    2020-12-14 16:47:50 - first revision by duany
	 *        
	 */
	public Result<?> getFormulaByCategory(String categoryId);
	
}
